import { getRequest, postRequest, deleteRequest } from '../utils/request'

export const requestAllRoles = params => {
  return getRequest('/roles/all', params)
}

export const requestAllRolesByPage = params => {
  return getRequest('/roles/allByPage', params)
}

export const requestGetchildListIDByRoleId = params => {
  return getRequest('/permissions/childListID', params)
}

export const requestSaveByRoleId = params => {
  return postRequest('/roles', params)
}

export const requestDelRoleById = params => {
  return deleteRequest('/roles/' + params)
}
